package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 充电订单
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_stroke_order_charge")
public class UserStrokeOrderCharge extends Model<UserStrokeOrderCharge> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private String orderId;
    /**
     * 充电量
     */
    @TableField("charge_capacity")
    private BigDecimal chargeCapacity;
    /**
     * 订单状态:充电订单状态:1：启动中,2：充电中,3：停止中,4：已结束,5：未知
     */
    @TableField("state")
    private Integer state;
    /**
     * 电费
     */
    @TableField("electricity_fee")
    private BigDecimal electricityFee;
    /**
     * 服务费
     */
    @TableField("service_charge")
    private BigDecimal serviceCharge;
    /**
     * 总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;
    /**
     * 行程ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 运营商编号
     */
    @JsonProperty("operatorID")
    @TableField("operator_id")
    private String operatorID;
    /**
     * 设备接口编号
     */
    @JsonProperty("connectorID")
    @TableField("connector_id")
    private String connectorID;
    /**
     * 剩余电量
     */
    @TableField("soc")
    private Integer soc;

    public void freeData() {
        this.orderId = null;
        this.chargeCapacity = null;
        this.state = null;
        this.electricityFee = null;
        this.serviceCharge = null;
        this.totalAmount = null;
        this.sid = null;
        this.operatorID = null;
        this.connectorID = null;
        this.soc = null;
    }

}
